<%@ include file="/common/taglibs.jsp"%>
<table class="list_table" width="100%" border="0" cellspacing="0" cellpadding="0" id="tblCarrierList">

<tr>
	<th width="15%"  ><input type="checkbox" name="allbox" onclick="checkAll(this.form)" style="margin: 0 0 0 0px" /><fmt:message key="shippingMethod.shippingMethod"/></th>
	<th width="33%"  ><fmt:message key="shippingMethod.shippingRegion"/></th>
	<th width="26%"  ><fmt:message key="shippingMethod.desc"/></th>
	<th width="11%"  ><fmt:message key="shippingMethod.belong2company"/></th>
	<th width="6%"  ><fmt:message key="carrier.status"/></th>
	<th width="9%"  ><fmt:message key="shippingMethod.operation"/></th>
</tr> 

<!-- 列表核心部份table开始 -->
<c:forEach items="${carrierList}" var="carrier">
	<c:forEach items="${carrier.shippingMethods}" var="shippingMethod" varStatus="varStatus">
	  <c:set var="rowClass">
	     <c:if test="${varStatus.index mod 2 eq 0}">class="odd"</c:if> 
	      <c:if test="${varStatus.index mod 2 ne 0}">class="even"</c:if> 
	  </c:set>
	<tr ${rowClass}>  
	  <td>
	  <input type="checkbox" name="multiIds" value="${shippingMethod.shippingMethodId}"	class="checkbox" title="${shippingMethod.shippingMethodName}"/>
		<a href="shippingMethod.html?shippingMethodId=${shippingMethod.shippingMethodId}&doAction=edit">${shippingMethod.shippingMethodName}</a>
	</td>
		<td>
			<c:forEach items="${shippingMethod.shippingRates}" var="shippingRate" varStatus="shippingRateStatus">
				<a href="javascript:;" onclick="dlgEditShippingRate_show({shippingRateId:${shippingRate.shippingRateId}},'GET');">
					${(not empty shippingRate.region.regionName)?shippingRate.region.regionName:'x'}
				</a>
				<c:if test="${!shippingRateStatus.last}">|</c:if>
			</c:forEach>
		</td>
		<td>${shippingMethod.shippingMethodDetail}</td>
		<c:if test="${varStatus.first}">
		  <td rowspan="${fn:length(carrier.shippingMethods)}">
			<a href="carrier.html?doAction=edit&carrierId=${carrier.carrierId}&from=shippingMethods">${carrier.carrierName}</a>
		  </td>
		</c:if>
		<td>
			<c:if test="${shippingMethod.status==1}" ><fmt:message key="status.active"/></c:if>
			<c:if test="${shippingMethod.status==2}" ><fmt:message key="status.inactive"/></c:if>
		</td>
		<td>
			<a href="javascript:;" onclick="dlgEditShippingRate_show({shippingMethodId:${shippingMethod.shippingMethodId}},'GET');"><fmt:message key="shippingMethod.addRegion"/></a>
		</td>
	</tr>
	</c:forEach>
</c:forEach>
<!-- 列表核心部份table结束 -->
</table>
